package com.gton.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * <p>
 *
 * </p>
 *
 * @author GuoTong
 * @since 2022-11-27
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("auth_login_user")
@ApiModel(value = "AuthLoginUser对象", description = "")
public class AuthLoginUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键-自增", hidden = true)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户名")
    @TableField("username")
    @NotNull
    private String username;

    @ApiModelProperty("密码：AES加密")
    @TableField("`password`")
    @NotNull
    private String password;

    @ApiModelProperty("权限:默认USER")
    @TableField("rule")
    private String rule = "USER";

    @ApiModelProperty("性别：默认男")
    @TableField("sex")
    private String sex = "男";

    @ApiModelProperty("头像")
    @TableField("head_portrait")
    private String headPortrait;

    @ApiModelProperty("电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("地址")
    @TableField("address")
    private String address;

    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("个人介绍")
    @TableField("description")
    private String description;

    @ApiModelProperty(value = "辑删除（0-标识删除,1-标识可用）", hidden = true)
    @TableField("is_del")
    @TableLogic
    private Integer isDel = 1;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间", hidden = true)
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}
